package com.quartz.dao;

import com.quartz.entity.Account;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

/**
 * Created with IntelliJ IDEA.
 * User: lixiao
 * Created Date: 2020/7/31 15:16
 */
@Repository(value = "accountDao")
@Mapper
public interface AccountDao {

    @Insert("INSERT INTO account(id,name) VALUES (#{id},#{accountName})")
    int add (Account account);

    @Select("select id from account where id = #{id}")
    Account queryByid(@Param("id") int id);
}